3.646 \(\int \frac{(d+e x)^2}{\sqrt{f+g x} \sqrt{a+c x^2}} \, dx\)

Optimal. Leaf size=356 \[ -\frac{2 \sqrt{-a} \sqrt{\frac{c x^2}{a}+1} \sqrt{\frac{\sqrt{c} (f+g x)}{\sqrt{-a} g+\sqrt{c} f}} \left (g^2 \left (3 c d^2-a e^2\right )+2 c e f (e f-3 d g)\right ) F\left (\sin ^{-1}\left (\frac{\sqrt{1-\frac{\sqrt{c} x}{\sqrt{-a}}}}{\sqrt{2}}\right )|-\frac{2 a g}{\sqrt{-a} \sqrt{c} f-a g}\right )}{3 c^{3/2} g^2 \sqrt{a+c x^2} \sqrt{f+g x}}+\frac{4 \sqrt{-a} e \sqrt{\frac{c x^2}{a}+1} \sqrt{f+g x} (e f-3 d g) E\left (\sin ^{-1}\left (\frac{\sqrt{1-\frac{\sqrt{c} x}{\sqrt{-a}}}}{\sqrt{2}}\right )|-\frac{2 a g}{\sqrt{-a} \sqrt{c} f-a g}\right )}{3 \sqrt{c} g^2 \sqrt{a+c x^2} \sqrt{\frac{\sqrt{c} (f+g x)}{\sqrt{-a} g+\sqrt{c} f}}}+\frac{2 e^2 \sqrt{a+c x^2} \sqrt{f+g x}}{3 c g} \]

[Out]

(2*e^2*Sqrt[f + g*x]*Sqrt[a + c*x^2])/(3*c*g) + (4*Sqrt[-a]*e*(e*f - 3*d*g)*Sqrt
[f + g*x]*Sqrt[1 + (c*x^2)/a]*EllipticE[ArcSin[Sqrt[1 - (Sqrt[c]*x)/Sqrt[-a]]/Sq
rt[2]], (-2*a*g)/(Sqrt[-a]*Sqrt[c]*f - a*g)])/(3*Sqrt[c]*g^2*Sqrt[(Sqrt[c]*(f +
g*x))/(Sqrt[c]*f + Sqrt[-a]*g)]*Sqrt[a + c*x^2]) - (2*Sqrt[-a]*((3*c*d^2 - a*e^2
)*g^2 + 2*c*e*f*(e*f - 3*d*g))*Sqrt[(Sqrt[c]*(f + g*x))/(Sqrt[c]*f + Sqrt[-a]*g)
]*Sqrt[1 + (c*x^2)/a]*EllipticF[ArcSin[Sqrt[1 - (Sqrt[c]*x)/Sqrt[-a]]/Sqrt[2]],
(-2*a*g)/(Sqrt[-a]*Sqrt[c]*f - a*g)])/(3*c^(3/2)*g^2*Sqrt[f + g*x]*Sqrt[a + c*x^
2])

_______________________________________________________________________________________

Rubi [A]  time = 1.03231, antiderivative size = 356, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 6, integrand size = 28, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.214 \[ -\frac{2 \sqrt{-a} \sqrt{\frac{c x^2}{a}+1} \sqrt{\frac{\sqrt{c} (f+g x)}{\sqrt{-a} g+\sqrt{c} f}} \left (g^2 \left (3 c d^2-a e^2\right )+2 c e f (e f-3 d g)\right ) F\left (\sin ^{-1}\left (\frac{\sqrt{1-\frac{\sqrt{c} x}{\sqrt{-a}}}}{\sqrt{2}}\right )|-\frac{2 a g}{\sqrt{-a} \sqrt{c} f-a g}\right )}{3 c^{3/2} g^2 \sqrt{a+c x^2} \sqrt{f+g x}}+\frac{4 \sqrt{-a} e \sqrt{\frac{c x^2}{a}+1} \sqrt{f+g x} (e f-3 d g) E\left (\sin ^{-1}\left (\frac{\sqrt{1-\frac{\sqrt{c} x}{\sqrt{-a}}}}{\sqrt{2}}\right )|-\frac{2 a g}{\sqrt{-a} \sqrt{c} f-a g}\right )}{3 \sqrt{c} g^2 \sqrt{a+c x^2} \sqrt{\frac{\sqrt{c} (f+g x)}{\sqrt{-a} g+\sqrt{c} f}}}+\frac{2 e^2 \sqrt{a+c x^2} \sqrt{f+g x}}{3 c g} \]

Antiderivative was successfully verified.

[In]  Int[(d + e*x)^2/(Sqrt[f + g*x]*Sqrt[a + c*x^2]),x]

[Out]

(2*e^2*Sqrt[f + g*x]*Sqrt[a + c*x^2])/(3*c*g) + (4*Sqrt[-a]*e*(e*f - 3*d*g)*Sqrt
[f + g*x]*Sqrt[1 + (c*x^2)/a]*EllipticE[ArcSin[Sqrt[1 - (Sqrt[c]*x)/Sqrt[-a]]/Sq
rt[2]], (-2*a*g)/(Sqrt[-a]*Sqrt[c]*f - a*g)])/(3*Sqrt[c]*g^2*Sqrt[(Sqrt[c]*(f +
g*x))/(Sqrt[c]*f + Sqrt[-a]*g)]*Sqrt[a + c*x^2]) - (2*Sqrt[-a]*((3*c*d^2 - a*e^2
)*g^2 + 2*c*e*f*(e*f - 3*d*g))*Sqrt[(Sqrt[c]*(f + g*x))/(Sqrt[c]*f + Sqrt[-a]*g)
]*Sqrt[1 + (c*x^2)/a]*EllipticF[ArcSin[Sqrt[1 - (Sqrt[c]*x)/Sqrt[-a]]/Sqrt[2]],
(-2*a*g)/(Sqrt[-a]*Sqrt[c]*f - a*g)])/(3*c^(3/2)*g^2*Sqrt[f + g*x]*Sqrt[a + c*x^
2])

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 174.557, size = 602, normalized size = 1.69 \[ \frac{2 e^{2} \sqrt{a + c x^{2}} \sqrt{f + g x}}{3 c g} - \frac{2 e \sqrt{- a} \sqrt{1 + \frac{c x^{2}}{a}} \sqrt{f + g x} \left (d g - e f\right ) E\left (\operatorname{asin}{\left (\sqrt{- \frac{\sqrt{c} x}{2 \sqrt{- a}} + \frac{1}{2}} \right )}\middle | \frac{2 a g}{a g - \sqrt{c} f \sqrt{- a}}\right )}{\sqrt{c} g^{2} \sqrt{\frac{\sqrt{c} \sqrt{- a} \left (- f - g x\right )}{a g - \sqrt{c} f \sqrt{- a}}} \sqrt{a + c x^{2}}} - \frac{2 e \sqrt{- a} \sqrt{1 + \frac{c x^{2}}{a}} \sqrt{f + g x} \left (3 d g + e f\right ) E\left (\operatorname{asin}{\left (\sqrt{- \frac{\sqrt{c} x}{2 \sqrt{- a}} + \frac{1}{2}} \right )}\middle | \frac{2 a g}{a g - \sqrt{c} f \sqrt{- a}}\right )}{3 \sqrt{c} g^{2} \sqrt{\frac{\sqrt{c} \sqrt{- a} \left (- f - g x\right )}{a g - \sqrt{c} f \sqrt{- a}}} \sqrt{a + c x^{2}}} - \frac{2 \sqrt{- a} \sqrt{\frac{\sqrt{c} \sqrt{- a} \left (- f - g x\right )}{a g - \sqrt{c} f \sqrt{- a}}} \sqrt{1 + \frac{c x^{2}}{a}} \left (d g - e f\right )^{2} F\left (\operatorname{asin}{\left (\sqrt{- \frac{\sqrt{c} x}{2 \sqrt{- a}} + \frac{1}{2}} \right )}\middle | \frac{2 a g}{a g - \sqrt{c} f \sqrt{- a}}\right )}{\sqrt{c} g^{2} \sqrt{a + c x^{2}} \sqrt{f + g x}} + \frac{2 e^{2} \sqrt{- a} \sqrt{\frac{\sqrt{c} \sqrt{- a} \left (- f - g x\right )}{a g - \sqrt{c} f \sqrt{- a}}} \sqrt{1 + \frac{c x^{2}}{a}} \left (a g^{2} + c f^{2}\right ) F\left (\operatorname{asin}{\left (\sqrt{- \frac{\sqrt{c} x}{2 \sqrt{- a}} + \frac{1}{2}} \right )}\middle | \frac{2 a g}{a g - \sqrt{c} f \sqrt{- a}}\right )}{3 c^{\frac{3}{2}} g^{2} \sqrt{a + c x^{2}} \sqrt{f + g x}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((e*x+d)**2/(g*x+f)**(1/2)/(c*x**2+a)**(1/2),x)

[Out]

2*e**2*sqrt(a + c*x**2)*sqrt(f + g*x)/(3*c*g) - 2*e*sqrt(-a)*sqrt(1 + c*x**2/a)*
sqrt(f + g*x)*(d*g - e*f)*elliptic_e(asin(sqrt(-sqrt(c)*x/(2*sqrt(-a)) + 1/2)),
2*a*g/(a*g - sqrt(c)*f*sqrt(-a)))/(sqrt(c)*g**2*sqrt(sqrt(c)*sqrt(-a)*(-f - g*x)
/(a*g - sqrt(c)*f*sqrt(-a)))*sqrt(a + c*x**2)) - 2*e*sqrt(-a)*sqrt(1 + c*x**2/a)
*sqrt(f + g*x)*(3*d*g + e*f)*elliptic_e(asin(sqrt(-sqrt(c)*x/(2*sqrt(-a)) + 1/2)
), 2*a*g/(a*g - sqrt(c)*f*sqrt(-a)))/(3*sqrt(c)*g**2*sqrt(sqrt(c)*sqrt(-a)*(-f -
 g*x)/(a*g - sqrt(c)*f*sqrt(-a)))*sqrt(a + c*x**2)) - 2*sqrt(-a)*sqrt(sqrt(c)*sq
rt(-a)*(-f - g*x)/(a*g - sqrt(c)*f*sqrt(-a)))*sqrt(1 + c*x**2/a)*(d*g - e*f)**2*
elliptic_f(asin(sqrt(-sqrt(c)*x/(2*sqrt(-a)) + 1/2)), 2*a*g/(a*g - sqrt(c)*f*sqr
t(-a)))/(sqrt(c)*g**2*sqrt(a + c*x**2)*sqrt(f + g*x)) + 2*e**2*sqrt(-a)*sqrt(sqr
t(c)*sqrt(-a)*(-f - g*x)/(a*g - sqrt(c)*f*sqrt(-a)))*sqrt(1 + c*x**2/a)*(a*g**2
+ c*f**2)*elliptic_f(asin(sqrt(-sqrt(c)*x/(2*sqrt(-a)) + 1/2)), 2*a*g/(a*g - sqr
t(c)*f*sqrt(-a)))/(3*c**(3/2)*g**2*sqrt(a + c*x**2)*sqrt(f + g*x))

_______________________________________________________________________________________

Mathematica [C]  time = 5.85252, size = 473, normalized size = 1.33 \[ \frac{2 \sqrt{f+g x} \left (\frac{g \sqrt{f+g x} \sqrt{\frac{g \left (x+\frac{i \sqrt{a}}{\sqrt{c}}\right )}{f+g x}} \sqrt{-\frac{-g x+\frac{i \sqrt{a} g}{\sqrt{c}}}{f+g x}} \left (2 \sqrt{a} \sqrt{c} e (e f-3 d g)-i a e^2 g+3 i c d^2 g\right ) F\left (i \sinh ^{-1}\left (\frac{\sqrt{-f-\frac{i \sqrt{a} g}{\sqrt{c}}}}{\sqrt{f+g x}}\right )|\frac{\sqrt{c} f-i \sqrt{a} g}{\sqrt{c} f+i \sqrt{a} g}\right )}{\sqrt{-f-\frac{i \sqrt{a} g}{\sqrt{c}}}}-\frac{2 e g^2 \left (a+c x^2\right ) (e f-3 d g)}{f+g x}-2 i c e \sqrt{f+g x} \sqrt{-f-\frac{i \sqrt{a} g}{\sqrt{c}}} (e f-3 d g) \sqrt{\frac{g \left (x+\frac{i \sqrt{a}}{\sqrt{c}}\right )}{f+g x}} \sqrt{-\frac{-g x+\frac{i \sqrt{a} g}{\sqrt{c}}}{f+g x}} E\left (i \sinh ^{-1}\left (\frac{\sqrt{-f-\frac{i \sqrt{a} g}{\sqrt{c}}}}{\sqrt{f+g x}}\right )|\frac{\sqrt{c} f-i \sqrt{a} g}{\sqrt{c} f+i \sqrt{a} g}\right )+e^2 g^2 \left (a+c x^2\right )\right )}{3 c g^3 \sqrt{a+c x^2}} \]

Antiderivative was successfully verified.

[In]  Integrate[(d + e*x)^2/(Sqrt[f + g*x]*Sqrt[a + c*x^2]),x]

[Out]

(2*Sqrt[f + g*x]*(e^2*g^2*(a + c*x^2) - (2*e*g^2*(e*f - 3*d*g)*(a + c*x^2))/(f +
 g*x) - (2*I)*c*e*Sqrt[-f - (I*Sqrt[a]*g)/Sqrt[c]]*(e*f - 3*d*g)*Sqrt[(g*((I*Sqr
t[a])/Sqrt[c] + x))/(f + g*x)]*Sqrt[-(((I*Sqrt[a]*g)/Sqrt[c] - g*x)/(f + g*x))]*
Sqrt[f + g*x]*EllipticE[I*ArcSinh[Sqrt[-f - (I*Sqrt[a]*g)/Sqrt[c]]/Sqrt[f + g*x]
], (Sqrt[c]*f - I*Sqrt[a]*g)/(Sqrt[c]*f + I*Sqrt[a]*g)] + (g*((3*I)*c*d^2*g - I*
a*e^2*g + 2*Sqrt[a]*Sqrt[c]*e*(e*f - 3*d*g))*Sqrt[(g*((I*Sqrt[a])/Sqrt[c] + x))/
(f + g*x)]*Sqrt[-(((I*Sqrt[a]*g)/Sqrt[c] - g*x)/(f + g*x))]*Sqrt[f + g*x]*Ellipt
icF[I*ArcSinh[Sqrt[-f - (I*Sqrt[a]*g)/Sqrt[c]]/Sqrt[f + g*x]], (Sqrt[c]*f - I*Sq
rt[a]*g)/(Sqrt[c]*f + I*Sqrt[a]*g)])/Sqrt[-f - (I*Sqrt[a]*g)/Sqrt[c]]))/(3*c*g^3
*Sqrt[a + c*x^2])

_______________________________________________________________________________________

Maple [B]  time = 0.054, size = 1769, normalized size = 5. \[ \text{result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((e*x+d)^2/(g*x+f)^(1/2)/(c*x^2+a)^(1/2),x)

[Out]

2/3*((-(g*x+f)*c/(g*(-a*c)^(1/2)-c*f))^(1/2)*((-c*x+(-a*c)^(1/2))*g/(g*(-a*c)^(1
/2)+c*f))^(1/2)*((c*x+(-a*c)^(1/2))*g/(g*(-a*c)^(1/2)-c*f))^(1/2)*EllipticF((-(g
*x+f)*c/(g*(-a*c)^(1/2)-c*f))^(1/2),(-(g*(-a*c)^(1/2)-c*f)/(g*(-a*c)^(1/2)+c*f))
^(1/2))*(-a*c)^(1/2)*a*e^2*g^3-3*(-(g*x+f)*c/(g*(-a*c)^(1/2)-c*f))^(1/2)*((-c*x+
(-a*c)^(1/2))*g/(g*(-a*c)^(1/2)+c*f))^(1/2)*((c*x+(-a*c)^(1/2))*g/(g*(-a*c)^(1/2
)-c*f))^(1/2)*EllipticF((-(g*x+f)*c/(g*(-a*c)^(1/2)-c*f))^(1/2),(-(g*(-a*c)^(1/2
)-c*f)/(g*(-a*c)^(1/2)+c*f))^(1/2))*(-a*c)^(1/2)*c*d^2*g^3+6*((-c*x+(-a*c)^(1/2)
)*g/(g*(-a*c)^(1/2)+c*f))^(1/2)*((c*x+(-a*c)^(1/2))*g/(g*(-a*c)^(1/2)-c*f))^(1/2
)*EllipticF((-(g*x+f)*c/(g*(-a*c)^(1/2)-c*f))^(1/2),(-(g*(-a*c)^(1/2)-c*f)/(g*(-
a*c)^(1/2)+c*f))^(1/2))*(-(g*x+f)*c/(g*(-a*c)^(1/2)-c*f))^(1/2)*(-a*c)^(1/2)*c*d
*e*f*g^2-2*(-(g*x+f)*c/(g*(-a*c)^(1/2)-c*f))^(1/2)*((-c*x+(-a*c)^(1/2))*g/(g*(-a
*c)^(1/2)+c*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/(g*(-a*c)^(1/2)-c*f))^(1/2)*Ell
ipticE((-(g*x+f)*c/(g*(-a*c)^(1/2)-c*f))^(1/2),(-(g*(-a*c)^(1/2)-c*f)/(g*(-a*c)^
(1/2)+c*f))^(1/2))*a*c*d*e*g^3+2*(-(g*x+f)*c/(g*(-a*c)^(1/2)-c*f))^(1/2)*((-c*x+
(-a*c)^(1/2))*g/(g*(-a*c)^(1/2)+c*f))^(1/2)*((c*x+(-a*c)^(1/2))*g/(g*(-a*c)^(1/2
)-c*f))^(1/2)*EllipticE((-(g*x+f)*c/(g*(-a*c)^(1/2)-c*f))^(1/2),(-(g*(-a*c)^(1/2
)-c*f)/(g*(-a*c)^(1/2)+c*f))^(1/2))*a*c*e^2*f*g^2-6*(-(g*x+f)*c/(g*(-a*c)^(1/2)-
c*f))^(1/2)*((-c*x+(-a*c)^(1/2))*g/(g*(-a*c)^(1/2)+c*f))^(1/2)*((c*x+(-a*c)^(1/2
))*g/(g*(-a*c)^(1/2)-c*f))^(1/2)*EllipticE((-(g*x+f)*c/(g*(-a*c)^(1/2)-c*f))^(1/
2),(-(g*(-a*c)^(1/2)-c*f)/(g*(-a*c)^(1/2)+c*f))^(1/2))*c^2*d*e*f^2*g+2*(-(g*x+f)
*c/(g*(-a*c)^(1/2)-c*f))^(1/2)*((-c*x+(-a*c)^(1/2))*g/(g*(-a*c)^(1/2)+c*f))^(1/2
)*((c*x+(-a*c)^(1/2))*g/(g*(-a*c)^(1/2)-c*f))^(1/2)*EllipticE((-(g*x+f)*c/(g*(-a
*c)^(1/2)-c*f))^(1/2),(-(g*(-a*c)^(1/2)-c*f)/(g*(-a*c)^(1/2)+c*f))^(1/2))*c^2*e^
2*f^3+x^3*c^2*e^2*g^3+x^2*c^2*e^2*f*g^2+x*a*c*e^2*g^3+a*c*e^2*f*g^2)*(g*x+f)^(1/
2)*(c*x^2+a)^(1/2)/c^2/g^3/(c*g*x^3+c*f*x^2+a*g*x+a*f)

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{{\left (e x + d\right )}^{2}}{\sqrt{c x^{2} + a} \sqrt{g x + f}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((e*x + d)^2/(sqrt(c*x^2 + a)*sqrt(g*x + f)),x, algorithm="maxima")

[Out]

integrate((e*x + d)^2/(sqrt(c*x^2 + a)*sqrt(g*x + f)), x)

_______________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \[{\rm integral}\left (\frac{e^{2} x^{2} + 2 \, d e x + d^{2}}{\sqrt{c x^{2} + a} \sqrt{g x + f}}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((e*x + d)^2/(sqrt(c*x^2 + a)*sqrt(g*x + f)),x, algorithm="fricas")

[Out]

integral((e^2*x^2 + 2*d*e*x + d^2)/(sqrt(c*x^2 + a)*sqrt(g*x + f)), x)

_______________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{\left (d + e x\right )^{2}}{\sqrt{a + c x^{2}} \sqrt{f + g x}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((e*x+d)**2/(g*x+f)**(1/2)/(c*x**2+a)**(1/2),x)

[Out]

Integral((d + e*x)**2/(sqrt(a + c*x**2)*sqrt(f + g*x)), x)

_______________________________________________________________________________________

GIAC/XCAS [F(-2)]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: RuntimeError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((e*x + d)^2/(sqrt(c*x^2 + a)*sqrt(g*x + f)),x, algorithm="giac")

[Out]

Exception raised: RuntimeError